﻿@{
    if (Request.IsAuthenticated)
    {
    <div class="auth">
        <a href="/Personal/Management">个人管理</a>
        @{
        var unread = Convert.ToInt32(Context.Items[typeof(Message)]);
        if (unread > 0)
        {  
            <text>
            <span>@Html.ActionLink("[{0}封新信件]".FormatWith(unread), "MailBox", "Personal")</span>
            </text>
        }
        }
        <a href="/Logout">退出</a>
    </div>
    }
    else
    {
    <div class="auth"><a href="/Login">登录</a> 或 <a href="/SignUp">注册</a></div>
    }
}
